package com.hzy.pms.domain.bo;

import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import java.math.BigDecimal;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 商品信息业务对象 pms_product_snapshot
 *
 * @author zengxin
 * @date 2023-10-17
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class ProductSnapshotBo extends BaseEntity {

    /**
     * ID
     */
    @NotNull(message = "ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 产品
     */
    @NotNull(message = "产品不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long productId;

    /**
     * 品牌
     */
    @NotNull(message = "品牌不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long brandId;

    /**
     * 项目
     */
    @NotNull(message = "项目不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long categoryId;

    /**
     * 商品编码
     */
    @NotBlank(message = "商品编码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String outProductId;

    /**
     * 标题
     */
    @NotBlank(message = "标题不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 主图
     */
    @NotBlank(message = "主图不能为空", groups = { AddGroup.class, EditGroup.class })
    private String pic;

    /**
     * 画册图片，连产品图片限制为5张，以逗号分割
     */
    @NotBlank(message = "画册图片，连产品图片限制为5张，以逗号分割不能为空", groups = { AddGroup.class, EditGroup.class })
    private String albumPics;

    /**
     * 上架状态：0->下架；1->上架
     */
    @NotNull(message = "上架状态：0->下架；1->上架不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer publishStatus;

    /**
     * 排序
     */
    @NotNull(message = "排序不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer sort;

    /**
     * 价格
     */
    @NotNull(message = "价格不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal price;

    /**
     * 单位
     */
    @NotBlank(message = "单位不能为空", groups = { AddGroup.class, EditGroup.class })
    private String unit;

    /**
     * 商品重量，默认为克
     */
    @NotNull(message = "商品重量，默认为克不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal weight;

    /**
     * 产品详情网页内容
     */
    @NotBlank(message = "产品详情网页内容不能为空", groups = { AddGroup.class, EditGroup.class })
    private String detailHtml;

    /**
     * 移动端网页详情
     */
    @NotBlank(message = "移动端网页详情不能为空", groups = { AddGroup.class, EditGroup.class })
    private String detailMobileHtml;

    /**
     * 品牌名称
     */
    @NotBlank(message = "品牌名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String brandName;

    /**
     * 商品分类名称
     */
    @NotBlank(message = "商品分类名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String productCategoryName;

    /**
     * 商品销售属性，json格式
     */
    @NotBlank(message = "商品销售属性，json格式不能为空", groups = { AddGroup.class, EditGroup.class })
    private String productAttr;


}
